home *** CD-ROM | disk | FTP | other *** search
/ F1 Licenseware / F1 Licenseware - Volume 1.iso / disks / 050a.dms / 050a.adf / EXAMPLE_PROGRAMS / example04.AMOS / example04.amosSourceCode
AMOS Source Code  |  1992-02-26  |  2KB  |  60 lines

  1. '====================
  2. 'EXAMPLE PROGRAM FOUR
  3. '====================  
  4. '
  5. 'A program to print any times table from 1 to 99 
  6. '
  7. '
  8. Rem Remove the mouse pointer,set text background 
  9. Rem to black and clear the screen to black, see EXAMPLE1 and EXAMPLE2  
  10. '------------------------------------------------------------------
  11. Hide : Paper 0 : Cls 0
  12.  
  13.  
  14. Rem ask the user what table they want displayed and store that number in TT      
  15. '------------------------------------------------------------------------- 
  16. Line Input "TYPE IN A NUMBER 1-99 ";TT
  17.  
  18.  
  19. Rem clear the screen to red and set the paper colour to red and turn curs off  
  20. '--------------------------------------------------------------------------------  
  21. Cls 4 : Paper 4 : Curs Off 
  22.  
  23.  
  24. Rem set the for next loop starting at 1 and ending at 12   
  25. '--------------------------------------------------------  
  26. For A=1 To 12
  27.  
  28.  
  29. Rem print the calculation A*TT to the screen 
  30. '--------------------------------------------
  31. Print A*TT
  32.  
  33.  
  34. Rem Amos now INCrements A automatically and checks to see if A is less than 12 
  35. Rem which is the maximum we have asked it to go to , change it if you like.
  36. Rem If A is less than 12 Amos will jump back to do the next calculation. 
  37. '------------------------------------------------------------------------------
  38. Next A
  39.  
  40.  
  41. Rem If A was more than or equal to 12 it will arrive here, where Amos waits
  42. Rem for a key press from you then jumps back to the editor.
  43. '----------------------------------------------------------------------------
  44. Wait Key : Edit 
  45.  
  46.  
  47.  
  48.  
  49. '============================================================================
  50. 'By trying to keep things simple this programis severely lacking in certain
  51. 'places. For exaple the user can type ANY number in and it would be nice to
  52. 'have the table numbered 1 to 12 down the side of each calculation.
  53. 'This is fairly simple to do. Do you think you could manage it?
  54. 'Why not have a go. A few hints: The loop counter (A) holds the number you need
  55. 'to PRINT along side the calculation. To stop the program accepting an input 
  56. 'of more than 99 will require an IF THEN test which we haven't covered yet.
  57. 'Why not come back here and try to implement this change when you have learned 
  58. 'about IF and THEN? Go on, I dare ya!
  59. '==============================================================================  
  60. '